package com.ujs.edu.medicine.dao;
import com.ujs.edu.medicine.dataobject.YunjiayiError;
import java.util.List;
import org.apache.ibatis.annotations.*;
@Mapper
public interface YunjiayiErrorMapper {


    @Insert({
            "INSERT INTO yunjiayi_error( userId,content, files, identityID, createtime)" +
                    " VALUES ( #{userId,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}," +
                    " #{files,jdbcType=VARCHAR}, #{identityID, jdbcType=INTEGER},now())"
    })
    int insert(YunjiayiError record);
    @Select({
            "SELECT * FROM  yunjiayi_error WHERE errorID= #{errorID,jdbcType=INTEGER}"
            })
   YunjiayiError selectByPrimaryKey(Integer errorID);
    @Select({
            "SELECT * FROM  yunjiayi_error WHERE identityID= #{identityID, jdbcType=INTEGER}"
    })
    List<YunjiayiError> selectByIdentity(Integer identity);
    @Select({
            "SELECT * FROM  yunjiayi_error "
    })
    List<YunjiayiError> selectALL();
    @Select({
            "select * from yunjiayi_error  where identityID= #{identityID, jdbcType=INTEGER} limit #{startIndex}, #{pageSize}"
    })
    List<YunjiayiError> selectLimit(@Param("startIndex")Integer startIndex,@Param("pageSize")Integer pageSize,@Param("identityID")Integer identityID);

}